package com.youqingkuang.ipmsg.listener;

import java.util.Observable;
import java.util.Observer;
import com.youqingkuang.ipmsg.event.MemberEvent;

public abstract class ExitListener implements Observer {

    public void update(Observable source, Object event) {
        if (event instanceof MemberEvent) {
            memberExit((MemberEvent)event);
        } else {
            throw new IllegalArgumentException("unknown event");
        }
    }

    public abstract void memberExit(MemberEvent event);

}
